<?php echo isset($notify) ? '<div class="alert alert-success">'.$notify.'</div>' : "" ?>

<form class="form-horizontal" role="form" method="post" action="<?=site_url('exportw/success') ?>">    
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Tên người lập phiếu</label>   
    <div class="col-sm-10">    
      <input type="text" name="maker" class="form-control" id="inputPassword3" placeholder="" value="">
    </div>
  </div>

  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Lý do</label>   
    <div class="col-sm-10">    
      <textarea class="form-control" name="note" rows="3"></textarea>
    </div>
  </div>  

  <button type="submit" class="btn btn-primary">Lập phiếu xuất kho</button>

</form>

<!-- list all codes will export -->
<?php if(isset($exportCodes)): ?> 
<h2>Danh sách xuất kho</h2>
<div class="table-responsive">
  <table class="table table-bordered">
    <thead>
      <tr class="success">    
        <td>Sản phẩm</td>    
        <td>Size</td>
        <td>Code</td>        
        <td>Màu</td>
        <td>Kho</td>    
        <td>Ngày tạo</td>           
      </tr>
    </thead>
    <tbody>
      <?php 
        $i = 1;     
        foreach ($exportCodes as $code):                    
          echo '<tr>
              <td>'.$code['product'].'</td>   
              <td>'.$code['product_size'].'</td>   
              <td>'.$code['code'].'</td>                            
              <td>'.$code['color'].'</td>
              <td>'.$code['storage'].'</td> 
              <td>'.$code['date_created'].'</td>              
              </tr>';                       
          $i++;
        endforeach;
      ?>
    </tbody>
  </table>
</div>
</form>
<?php endif; ?>